Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cert-tool logfile added. Modified common_logger function to write on files without root permission. #2911

Merged
merged 4 commits into from
Apr 24, 2024

Conversation

CarlosALgit
Copy link
Member

@CarlosALgit CarlosALgit commented Apr 17, 2024

Related issue
#2536

Description

The first problem to be solved was to add a path to write the logfile. The logfiles is going now to be created on the same directory where the wazuh-certs-tool.sh is executed.

I have left a comment here explaining in detail the issues we were having during the process of solving the primary issue and how we solved them.

Logs example

The tests that have been done are the following.

Build and execute the cert tool

Build and execute with -v option

Captura desde 2024-04-17 10-33-05

Build and execute without -v option

Captura desde 2024-04-17 10-33-44

Folder wazuh-certificates created

Captura desde 2024-04-17 10-42-32

Build the necessary files with wazuh-install.sh -g

Wazuh install tool was launched and the files on wazuh-install-files.tar are listed.

17/04/2024 10:49:56 INFO: Starting Wazuh installation assistant. Wazuh version: 4.9.0
17/04/2024 10:49:56 INFO: Verbose logging redirected to /var/log/wazuh-install.log
17/04/2024 10:50:02 INFO: --- Dependencies ----
17/04/2024 10:50:02 INFO: Installing gawk.
17/04/2024 10:50:05 INFO: Verifying that your system meets the recommended minimum hardware requirements.
17/04/2024 10:50:05 INFO: --- Configuration files ---
17/04/2024 10:50:05 INFO: Generating configuration files.
17/04/2024 10:50:06 INFO: Generating the root certificate.
17/04/2024 10:50:06 INFO: Generating Admin certificates.
17/04/2024 10:50:06 INFO: Generating Wazuh indexer certificates.
17/04/2024 10:50:06 INFO: Generating Filebeat certificates.
17/04/2024 10:50:06 INFO: Generating Wazuh dashboard certificates.
17/04/2024 10:50:07 INFO: Created wazuh-install-files.tar. It contains the Wazuh cluster key, certificates, and passwords necessary for installation.
17/04/2024 10:50:07 INFO: --- Dependencies ----
17/04/2024 10:50:07 INFO: Removing gawk.
root@carlos-laptop:/home/carlos/Documentos/wazuh/wazuh-packages/unattended_installer# tar -tf wazuh-install-files.tar 
wazuh-install-files/
wazuh-install-files/config.yml
wazuh-install-files/dashboard-1-key.pem
wazuh-install-files/wazuh-passwords.txt
wazuh-install-files/server-1-key.pem
wazuh-install-files/dashboard-1.pem
wazuh-install-files/root-ca.key
wazuh-install-files/admin.pem
wazuh-install-files/admin-key.pem
wazuh-install-files/indexer-1-key.pem
wazuh-install-files/root-ca.pem
wazuh-install-files/server-1.pem
wazuh-install-files/indexer-1.pem

CentOs test fail

On the automated tests, it's detected that the installation of wazuh-dashboard component fails because it's not still available for CentOs. As seen on the logs:
download.cf.centos.org No package wazuh-dashboard-4.9.0-* available. Error: Nothing to do

New issue

While doing this issue I noticed that when the wazuh-certs-tool.sh is created it doesn't have execute permissions so you have to manually give them. We are going to open a new issue for this to grant execute permissions when the tool is builded.

@CarlosALgit CarlosALgit requested a review from a team April 17, 2024 12:08
@CarlosALgit CarlosALgit self-assigned this Apr 17, 2024
@CarlosALgit CarlosALgit linked an issue Apr 17, 2024 that may be closed by this pull request
Copy link
Contributor

@davidcr01 davidcr01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CarlosALgit CarlosALgit requested review from davidcr01 and a team April 18, 2024 10:56
@CarlosALgit CarlosALgit requested a review from davidcr01 April 19, 2024 09:34
@teddytpc1 teddytpc1 merged commit a1bca34 into 4.9.0 Apr 24, 2024
8 of 9 checks passed
@teddytpc1 teddytpc1 deleted the change/2536-wazuh-certs-tool-log-file-not-defined branch April 24, 2024 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wazuh certs-tool log file not defined
3 participants